﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.Events.ArgumentCache
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using UnityEngine.Serialization;

#nullable disable
namespace UnityEngine.Events
{
  [Serializable]
  internal class ArgumentCache : ISerializationCallbackReceiver
  {
    [FormerlySerializedAs("objectArgument")]
    [SerializeField]
    private UnityEngine.Object m_ObjectArgument;
    [SerializeField]
    [FormerlySerializedAs("objectArgumentAssemblyTypeName")]
    private string m_ObjectArgumentAssemblyTypeName;
    [SerializeField]
    [FormerlySerializedAs("intArgument")]
    private int m_IntArgument;
    [FormerlySerializedAs("floatArgument")]
    [SerializeField]
    private float m_FloatArgument;
    [FormerlySerializedAs("stringArgument")]
    [SerializeField]
    private string m_StringArgument;
    [SerializeField]
    private bool m_BoolArgument;

    public UnityEngine.Object unityObjectArgument
    {
      get => this.m_ObjectArgument;
      set
      {
        this.m_ObjectArgument = value;
        this.m_ObjectArgumentAssemblyTypeName = value != (UnityEngine.Object) null ? value.GetType().AssemblyQualifiedName : string.Empty;
      }
    }

    public string unityObjectArgumentAssemblyTypeName => this.m_ObjectArgumentAssemblyTypeName;

    public int intArgument
    {
      get => this.m_IntArgument;
      set => this.m_IntArgument = value;
    }

    public float floatArgument
    {
      get => this.m_FloatArgument;
      set => this.m_FloatArgument = value;
    }

    public string stringArgument
    {
      get => this.m_StringArgument;
      set => this.m_StringArgument = value;
    }

    public bool boolArgument
    {
      get => this.m_BoolArgument;
      set => this.m_BoolArgument = value;
    }

    public void OnBeforeSerialize()
    {
      this.m_ObjectArgumentAssemblyTypeName = UnityEventTools.TidyAssemblyTypeName(this.m_ObjectArgumentAssemblyTypeName);
    }

    public void OnAfterDeserialize()
    {
      this.m_ObjectArgumentAssemblyTypeName = UnityEventTools.TidyAssemblyTypeName(this.m_ObjectArgumentAssemblyTypeName);
    }
  }
}
